<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__CSS__/uhome.css" rel="stylesheet" type="text/css" />
    <link href="__CSS__/common.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/ymPrompt.css" />
    <script type="text/javascript" src="__JS__/jquery.js"></script>
    <script language="javascript" src="__JS__/user.js"></script>
    <title>会员绑定</title>
    <style type="text/css">
        .r_title{margin-left: 50px;margin-top:15px;margin-bottom: 20px;}
        .r_title p{ height: 26px;line-height: 26px;color: #999}
        .input-text{color: #999;padding-left: 5px;}
        .sub{padding: 8px 40px;background:#FF7D32;border: none;color: #ffffff;margin-left: 30px;cursor: pointer;border-radius:5px; }
    </style>
</head>
<body>
<div class="header">
    <div class="wrap">
        <div class="logo">
            <a href="/" target="_blank"><img src="{$logo.login}"  /></a>
        </div>
    </div>
</div>
<div class="blank8"></div>
<div class="main reg">
    <div class="reg_m">
        <div class="l">
            <div class="wrap">
                <div class="r_title">
                    <h3>账号绑定</h3>
                    <p>没有{$siteName}账号，填写账号密码将会注册新账号并绑定{$type}账号</p>
                    <p>已有{$siteName}账号，填写账号密码将会绑定{$type}账号</p>
                </div>
                <form action="{:U('Login/bind')}" method="post" onsubmit="return check();">
                    <input type="hidden" name="httprefer" value="{$httprefer}"/>
                    <ul>
                        <li><label>昵称：</label>{$nickname}</li>
                        <li><label><em>*</em>用户名：</label><input class="input-text usr inpx" id="username" name="username"  type="text" data-default="用户名/邮箱" value="用户名/邮箱" /></li>
                        <li><label><em>*</em>密码：</label>
                            <input class="input-text inpx" type="text" id="textpwd" data-default="密码" value="密码">
                            <input class="input-text inpx" type="password" id="password" name="password" style="display:none;">
                        </li>
                        <li><label><em>*</em>验证码：</label><input class="yzm  inpx" name="verfiy" id="captcha_code" type="text" style="width:100px;float:left; margin-right:10px" /><span><a href="javascript:;"><img style="float:left;" id="verfiy" class="verfiy" src="{:U('Login/verfiy')}" width="92" height="32"  /></a><a class="verfiy" style="cursor:pointer" >看不清？</a></span></li>
                    </ul>
                    <div class="btn">
                        <input class="sub" type="submit" value="绑定会员">
                    </div>
                    <div class="r_title">
                        <p>如果您忘记密码了，可以从这里取回密码？<a target="_blank" href="{:U('Login/pass')}">取回密码？</a></p>
                        <p>如果您没有会员账号，可以通过注册新账号进入注册。 <a target="_blank" href="{:U('Login/reg')}">注册新账号</a></p>
                    </div>
                </form>
            </div>
        </div>
        <div class="r">
            <div class="rt allf60">
                已经注册？请 <a href="{:U('Login/index')}">直接登录&gt;&gt;</a>
            </div>
            <div class="rm">
                <p>选择其它快捷登录方式</p>
                <span class="login_qq"><a href="{:U('Login/login',array('type'=>'qq'))}"></a></span>
                <a href="javascript:;" class="login_sina"></a>
            </div>
        </div>
        <div class="blank8"></div>
    </div>
</div>
<div class="footer">
    <div class="wrap">
        <volist name="site_nav['footer']" id='vo'>
            <php> if($vo['status']){ </php>
            <a target="{$vo.open_type}" href="{$vo.url}">{$vo.name}</a> |
            <php>}</php>
        </volist>
        服务热线：{$contact.phone}
    </div>
</div>
<script>
    $(function(){
        $("#verfiy").click(function(){
            var timenow = new Date().getTime();
            $(this).attr("src","{:U('Login/verfiy')}&t="+timenow)
        });
        $(".input-text").focus(function(){
            var val = $(this).val();
            var defaultval = $(this).attr('data-default');
            if($(this).attr('id') == 'textpwd'){
                $(this).hide();
                $("#password").show().focus();
            }
            if(val == defaultval){
                $(this).val('');
            }

        }).blur(function(){
                    var val = $(this).val();
                    var defaultval = $(this).attr('data-default');

                    if(val == ''){
                        $(this).val(defaultval);
                    }
                });

    });
    function check(){
        var username = $("#username");
        var pass     = $("#password");
        var verfiy   = $("#verfiy");
        var namereg  = /^[\\u4E00-\\u9FA5\\uF900-\\uFA2D_\w\.@]+$/;
        if(!namereg.test(username.val()) || username.val() == username.attr('data-default')){
            alert('用户名格式不正确');
            username.focus().val('');
            return false;
        }
        if(pass.val().length()<6){
            alert('密码格式不正确');
            pass.focus();
            pass.val('');
            return false;
        }
        if(verfiy.val().length()<4){
            alert('认证码格式不正确');
            verfiy.focus();
            return false;
        }
        return true;
    }
</script>
</body>
</html>